package cn.lhx.blog.pojo;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import cn.lhx.blog.dao.DaoArticOrg;
/**
 *文章类
 * @author lhx
 *
 */
public class Article implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private int id;
	private String title="";
	private ArticleCategory category;
	private String keyWords="";//关键字
	private int originId;//来源ID
	private ArticleOrigin origin;//来源对象
	private Date postTime;
	private Date modTime;
	private String content="";
	private List<Comment> comments;
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	
	public ArticleCategory getCategory() {
		return category;
	}
	public void setCategory(ArticleCategory category) {
		this.category = category;
	}

	public String getKeyWords() {
		return keyWords;
	}
	public void setKeyWords(String keyWords) {
		this.keyWords = keyWords;
	}
	public ArticleOrigin getOrigin() {
		return origin;
	}
	public void setOrigin(ArticleOrigin origin) {
		this.origin = origin;
		this.originId=origin.getId();
	}
	public int getOriginId() {
		return originId;
	}
	public void setOriginId(int originId) {
		this.originId = originId;
		this.origin=new DaoArticOrg().getOrgById(originId);
	}
	public Date getPostTime() {
		return postTime;
	}
	public void setPostTime(Date postTime) {
		this.postTime = postTime;
	}
	public Date getModTime() {
		return modTime;
	}
	public void setModTime(Date modTime) {
		this.modTime = modTime;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public List<Comment> getComments() {
		return comments;
	}
	public void setComments(List<Comment> comments) {
		this.comments = comments;
	}

	

}

